package org.squabble.web.account;

import org.springmodules.validation.bean.conf.loader.annotation.handler.Email;
import org.springmodules.validation.bean.conf.loader.annotation.handler.Expression;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
import org.springmodules.validation.bean.conf.loader.annotation.handler.ValidatorRef;
import org.squabble.web.AbstractPasswordRequiredCommand;

@ValidatorRef("emailChangeValidator")
public class EmailChangeCommand extends AbstractPasswordRequiredCommand {

	private static final long serialVersionUID = -4145327301016673289L;

	@NotBlank
	@Email
	private String newEmail;

	@NotBlank
	@Expression("newEmail equals newEmailVerify")
	private String newEmailVerify;

	public String getNewEmail() {
		return newEmail;
	}

	public void setNewEmail(String newEmail) {
		this.newEmail = newEmail;
	}

	public String getNewEmailVerify() {
		return newEmailVerify;
	}

	public void setNewEmailVerify(String newEmailVerify) {
		this.newEmailVerify = newEmailVerify;
	}

}
